package com.bojx.cms.web;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.jfinal.core.Controller;
import com.jfinal.log.Log4jLog;

public class BaseController extends Controller {
	public Log4jLog LOG = Log4jLog.getLog(BaseController.class);

	
	
	@SuppressWarnings("rawtypes")
	protected Map<String, Object> buildPagination(List list, Integer count) {
		return buildPagination(list, count, null);
	
	}
	
	@SuppressWarnings("rawtypes")
	protected Map<String, Object> buildPagination(List list, Integer count, List<Map<String, Object>> footer) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("total", count);
		map.put("rows", list);
		if (footer != null)
			map.put("footer", footer);
		return map;
	}
}
